package com.dwy2002.common.exception;


import com.dwy2002.enums.Status;
import lombok.Getter;

import java.util.List;

/**
 * 自定义业务异常
 *
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/02/01
 */
@Getter
public class ValidationException extends RuntimeException {
    private final Status status;
    private final List<String> errors;

    public ValidationException(Status status, List<String> errors) {
        super(String.join("; ", errors));
        this.status = status;
        this.errors = errors;
    }
}
